home *** CD-ROM | disk | FTP | other *** search
/ Aminet 39 / Aminet 39 (2000)(Schatztruhe)[!][Oct 2000].iso / Aminet / util / wb / StopMenu.lha / stopmenuinstall / Install < prev    next >
Encoding:
Text File  |  2000-06-29  |  3.6 KB  |  228 lines

  1.  
  2. ; StopMenu Install Script
  3.  
  4. ; $Id: Install,v 1.5 2000/06/29 13:59:20 damir Rel $
  5.  
  6. ; (C)2000 Damir Arh
  7.  
  8.  
  9. ; Installs StopMenu
  10.  
  11.  
  12. ;-------------------------------------------------
  13.  
  14. ; string declaration
  15.  
  16. (set #select-dest
  17.     (cat "Please select where you want StopMenu to be installed.\n"
  18.         "A new drawer will be created.")
  19. )
  20.  
  21. (set #create-dest
  22.     (cat "Creating destination drawer")
  23. )
  24.  
  25. (set #copy-icon
  26.     (cat "Copying drawer icon")
  27. )
  28.  
  29. (set #copy-files
  30.     (cat "Copying program files")
  31. )
  32.  
  33. (set #copy-example
  34.     (cat "Copying a sample menu")
  35. )
  36.  
  37. (set #copy-setting
  38.     (cat "Copying sample StopMenu settings")
  39. )
  40.  
  41. (set #copy-starter
  42.     (cat "Setting up StopMenu autostart")
  43. )
  44.  
  45. (set #copy-newicon
  46.     (cat "Copying newicon.library")
  47. )
  48.  
  49. (set #copy-thomson
  50.     (cat "Copying thomson.library")
  51. )
  52.  
  53. (set #copy-wbstart
  54.     (cat "Copying wbstart.library")
  55. )
  56.  
  57. (set #copy-fonts
  58.     (cat "Copying fonts")
  59. )
  60.  
  61. (set #modify-startup
  62.     (cat "Modifying User-Startup file")
  63. )
  64.  
  65. (set #exit
  66.     (cat "Congratulations!\n"
  67.         "You have succesfully installed StopMenu.")
  68. )
  69.  
  70. (set #select-icons
  71.     (cat "Select which icons do you want the installer to set as default. "
  72.         "The other icons will also be installed. Check the documentation on "
  73.         "how to change the used ones.")
  74. )
  75.  
  76. (set #choice-newicon "NewIcons style")
  77. (set #choice-glowicon "GlowIcon style")
  78.  
  79. (set #bit-newicon %0)
  80. (set #bit-glowicon %1)
  81.  
  82. ;-------------------------------------------------
  83.  
  84. ; initialization
  85.  
  86. (set #source-dir (pathonly @icon))
  87.  
  88. (set #dest-dir
  89.     (askdir
  90.         (prompt #select-dest)
  91.         (help @askdir-help)
  92.         (default @default-dest)
  93.     )
  94. )
  95.  
  96. (set @default-dest (tackon #dest-dir "StopMenu"))
  97.  
  98. (if (= (exists @default-dest) 0)
  99.     (
  100.         (copyfiles
  101.             (prompt #copy-icon)
  102.             (source (tackon #source-dir "external/StopMenu.info"))
  103.             (dest #dest-dir)
  104.             (noposition)
  105.         )
  106.         (makedir @default-dest
  107.             (prompt #create-dest)
  108.         )
  109.     )
  110. )
  111.  
  112. (set #icons
  113.     (askchoice
  114.         (prompt #select-icons)
  115.         (help @askchoice-help)
  116.         (choices
  117.             #choice-newicon
  118.             #choice-glowicon
  119.         )
  120.         (default 0)
  121.     )
  122. )
  123.  
  124. (complete 20)
  125.  
  126.  
  127. ;------------------------------------------------
  128.  
  129. ; copying
  130.  
  131. (if (= #icons #bit-newicon)
  132.     (set #icons-filename "all/newicons")
  133.     (set #icons-filename "all/glowicons")
  134. )
  135.  
  136. (rename
  137.     (tackon #source-dir #icons-filename)
  138.     (tackon #source-dir "all/icons")
  139.     (prompt "")
  140.     (help "")
  141. )
  142.  
  143. (copyfiles
  144.     (prompt #copy-files)
  145.     (source (tackon #source-dir "all"))
  146.     (dest @default-dest)
  147.     (noposition)
  148.     (all)
  149. )
  150.  
  151. (rename
  152.     (tackon #source-dir "all/icons")
  153.     (tackon #source-dir #icons-filename)
  154.     (prompt "")
  155.     (help "")
  156. )
  157.  
  158. (if (= (exists (tackon @default-dest "StopMenu.menus")) 0)
  159.     (copyfiles
  160.         (prompt #copy-example)
  161.         (source (tackon #source-dir "external/StopMenu.menus"))
  162.         (dest @default-dest)
  163.     )
  164. )
  165.  
  166. (if (= (exists (tackon @default-dest "StopMenu.prefs")) 0)
  167.     (copyfiles
  168.         (prompt #copy-setting)
  169.         (source (tackon #source-dir "external/StopMenu.prefs"))
  170.         (dest @default-dest)
  171.     )
  172. )
  173.  
  174. (copyfiles
  175.     (prompt #copy-starter)
  176.     (source (tackon #source-dir "external/StopMenuStarter.info"))
  177.     (dest "SYS:WBStartup")
  178. )
  179.  
  180. (complete 40)
  181.  
  182. (copylib
  183.     (prompt #copy-newicon)
  184.     (source (tackon #source-dir "libs/newicon.library"))
  185.     (dest "LIBS:")
  186. )
  187.  
  188. (copyfiles
  189.     (prompt #copy-thomson)
  190.     (source (tackon #source-dir "libs/thomson.library"))
  191.     (dest "LIBS:")
  192. )
  193.  
  194. (copylib
  195.     (prompt #copy-wbstart)
  196.     (source (tackon #source-dir "libs/wbstart.library"))
  197.     (dest "LIBS:")
  198. )
  199.  
  200. (complete 60)
  201.  
  202. (copyfiles
  203.     (prompt #copy-fonts)
  204.     (source (tackon #source-dir "fonts"))
  205.     (dest "FONTS:")
  206.     (all)
  207. )
  208.  
  209. (complete 80)
  210.  
  211. (startup "StopMenu"
  212.     (prompt #modify-startup)
  213.     (help @startup-help)
  214.     (command (cat "Assign StopMenu: " @default-dest))
  215. )
  216.  
  217. (makeassign "StopMenu" @default-dest)
  218.  
  219. (complete 100)
  220.  
  221.  
  222. ;-------------------------------------------------
  223.  
  224. ; installation completed
  225.  
  226. (exit #exit)
  227.  
  228.